/*
 * Created on 25.06.2006 by leck
 *
 */
package de.devisnik.eidle.browser;

import org.eclipse.swt.SWT;
import org.eclipse.swt.browser.Browser;
import org.eclipse.swt.widgets.Composite;

import de.devisnik.eidle.util.ScreenWithDuration;

public class BrowserScreen extends ScreenWithDuration {

	private Browser itsBrowser;

	public BrowserScreen() {
		super("Browser", BrowserPreferences.getPresentationTime() * 1000);
	}

	public void createControl(final Composite parent) {
		super.createControl(parent);
		itsBrowser = new Browser(parent, SWT.NONE);
		itsBrowser.setUrl(getURL());
	}

	public void disposeControl() {
		itsBrowser.dispose();
		super.disposeControl();
	}

	public String getURL() {
		return BrowserPreferences.getURL();
	}

	public void setFocus() {
		itsBrowser.setFocus();
	}

	public void dispose() {
	}

}
